<template>
  <div>
    <h3>demo2 {{ username }}</h3>
  </div>
</template>

<script>
export default {
  data() {
    return {
      username: "张三",
    };
  },

  created() {
    this.$bus.on("aaa", (data) => {
      this.username = data;
    });
  },
};
</script>